Skip to content

Add import sorting#1029

Merged
mdellweg merged 1 commit intopulp:mainfrom
mdellweg:lint-format-ruff
Apr 23, 2026
Merged

Add import sorting#1029
mdellweg merged 1 commit intopulp:mainfrom
mdellweg:lint-format-ruff

Conversation

@mdellweg
Copy link
Copy Markdown
Member

Also activates ruff lint rulesets for preventing pulpcore.app imports and stray debugger statements.

@mdellweg mdellweg force-pushed the lint-format-ruff branch 3 times, most recently from dc2c514 to b39b068 Compare April 23, 2026 10:06
Also activates ruff lint rulesets for preventing pulpcore.app imports,
invalid gettext expressions and stray debugger statements.
@mdellweg mdellweg marked this pull request as ready for review April 23, 2026 12:07
@mdellweg mdellweg enabled auto-merge (rebase) April 23, 2026 12:07

- name: "Check for common gettext problems"
run: |
sh .ci/scripts/check_gettext.sh
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a set of flake8 rules for this all along... We activate them in ruff with the "INT" ruleset.

Comment thread .ci/scripts/pr_labels.py
import tomllib
from pathlib import Path

import tomllib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in the stdlib so it's a bit weird that it gets sorted into the 3rd party section

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this tool is sensitive on the python version and tomllib was only recently added to std...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added in 3.11 so not that recent :)

Copy link
Copy Markdown
Contributor

@dralley dralley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections other than the weirdness with tomllib. But not blocking

@mdellweg mdellweg merged commit 974a0a4 into pulp:main Apr 23, 2026
13 checks passed
@mdellweg mdellweg deleted the lint-format-ruff branch April 23, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants